﻿<%@ Page Language="C#"  AutoEventWireup="true" CodeBehind="ICM_Requisition.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Edit_Form.ICM_Requisition" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>รายการเบิกพัสดุ</title>
    <link rel="StyleSheet" href="../../Styles/StyleSheet.css" type="text/css"/>
</head>
<body>
    <form id="form1" runat="server">
         <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" >
         </asp:ScriptManager>
           <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
              <script type="text/javascript" src="../../Scripts/Common.js"></script>
              <script type="text/javascript">
                var clickCreate = 0;
                 var clickRequest = 0;
                 function ChangeTab(value, page_index) {
                    Page_ClientValidate('');    
                        if (Page_IsValid) { 
                            if (value == "Create") {
                                Create = 1;
                            }
                            if (value == "Request") {
                                Request = 1;
                            }
                            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
                            var pageView = $find("<%= RadMultiPage1.ClientID %>");
                            var tab = tabStrip.findTabByValue(value);
                            var pageViewIndex = page_index;
                            ResetClick();
                            tab.set_selected(true);
                            pageView.get_pageViews().getPageView(pageViewIndex).set_selected(true);
                       }
                    }
                 function OnClientTabSelecting(sender, eventArgs) {
                        var value = eventArgs.get_tab().get_value();
                        if ((value == "Create" && Create == 0)
                           || (value == "Request" && Request == 0))
                        {
                            eventArgs.set_cancel(true);
                        }
                        if (clickCreate == 1 
                            || clickRequest == 1
                        ) {
                            eventArgs.set_cancel(true);
                        }
                    }
                 function OnClientMouseOver(sender, eventArgs) {
                        var value = eventArgs.get_tab().get_value();
                        if (value == "Create")
                        {
                            clickCreate = 1; 
                        }
                        if (value == "Request")
                        {
                            clickRequest = 1; 
                        }
                    }
                function ResetClick()
                    {
                        clickCreate = 0;
                        clickRequest = 0;
                    }
                function onTextChangeGeneral(sender) {
                        if (sender.get_value() == "") {
                            sender.set_text("");
                        }
                    }
         </script>
         </telerik:RadCodeBlock>
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
                   <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="grdInventory">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdInventory" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <%--<telerik:AjaxUpdatedControl ControlID="btnEdit" LoadingPanelID="RadAjaxLoadingPanel1" />--%>
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Penel1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel4" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Penel2">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel4" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Penel3">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel4" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel5" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="grdInventory" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="Penel4">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel2" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel4" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="grdInventory" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="btnNext">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="btnNext" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="btnBack" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <%--<telerik:AjaxSetting AjaxControlID="Panel3">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel5" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="grdInventory" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>--%>
                        <telerik:AjaxSetting AjaxControlID="Panel5">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel3" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="Panel5" LoadingPanelID="RadAjaxLoadingPanel1" />
                                <telerik:AjaxUpdatedControl ControlID="grdInventory" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>    
    </telerik:RadAjaxManager>

       <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" Skin="Vista" CssClass="multiPage"> 
                <Tabs>
                    <telerik:RadTab runat="server" Text="สร้างรายการขอเบิกของ" Value="Create" Selected="true">
                    </telerik:RadTab>
                    <telerik:RadTab  runat="server" Text="รายละเอียดในการขอเบิกของ" Value="Request" >
                    </telerik:RadTab>
                </Tabs>
         </telerik:RadTabStrip>
             <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="pageView3">
                 <telerik:RadPageView ID="RadPageView1" runat="server">
                            <div class="moduleContent1000">
                                  <div class="moduleDivBottom1000">
                                     <asp:Panel ID="Panel1" runat="server" CssClass="contentPaneDiv" Height="450px" ScrollBars="Auto" align = "left" >    
                                             <br />
                                             <div align="right">
                                             <table> 
                                                      <tr>
                                                          <br />
                                                                    <td align="left" width = "150px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRequisitionNo" Text = "เลขที่ใบเบิกของ          : " Font-Bold="true"/>
                                                                         <asp:Label ID= "hStatus" runat="server" Visible = "false" />
                                                                         <asp:Label ID= "hrequisiton_des_item" runat ="server" Visible ="false" />
                                                                    </td>
                                                                    <td align="left">
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pRequisitionNo" Text = "RQ-yyyy-mm-xxxxx" Font-Bold="true"/>
                                                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    </td>
                                                     </tr>
                                                     <tr>
                                                                    <td colspan="2px"></td>
                                                     </tr>
                                                     <tr>
                                                              
                                                                    <td align="left" width = "150px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRequsitionDate" Text = "วันที่ทำรายการเบิกของ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td align="left">
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pRequisitionDate" DataFormatString="{0:d}" Text = "dd/mm/yyyy           " Font-Bold="true"/>
                                                                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                    </td>
                                                     </tr>
                                            </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblOrganize" Text = "หน่วยงาน          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pOrganize" Text = "ฝ่าย xxx           " Font-Bold="true"/>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblEmployee" Text = "ผู้ขอ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pEmployee" Text = "นาย xxx xxx           " Font-Bold="true"/>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblEmpPosition" Text = "ตำแหน่งของผู้ขอ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pEmpPosition" Text = "ตำแหน่ง xxx xxx           " Font-Bold="true"/>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblApproveName" Text = "ผู้อนุมัติ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pApproveName" Text = "นาย xxx xxx           " Font-Bold="true"/>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblApprovePos" Text = "ตำแหน่งของผู้อนุมัติ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <asp:Label CssClass="font-label" runat = "server" ID= "pApprovePos" Text = "ตำแหน่ง xxx xxx           " Font-Bold="true"/>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblDescription" Text = "เรื่อง          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <telerik:RadTextBox ID="txtDescription" runat="server" title="เรื่อง " Width="770" Enabled="false"></telerik:RadTextBox>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblObjectType" Text = "ประเภทวัสดุ          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                               <telerik:RadComboBox ID="cmbObjectType" Runat="server"
                                                                                            DataTextField="icm_obj_type_name" DataValueField="icm_obj_type_seq" 
                                                                                            EnableLoadOnDemand="true" 
                                                                                            ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                                                                                            EmptyMessage="< เลือกประเภทวัสดุ >" AllowCustomText="true" Filter="Contains"
                                                                                            OnClientTextChange="onTextChangeGeneral"
                                                                                            OnItemsRequested="cmbObjectType_ItemsRequested" Width="450px" title="เลือกประเภทวัสดุ">
                                                                              </telerik:RadComboBox>
                                                                              <asp:RequiredFieldValidator runat="server" 
                                                                                    ID="rfvObjectType" 
                                                                                    ControlToValidate="cmbObjectType"
                                                                                    ErrorMessage="* กรุณาเลือกประเภทวัสดุ" >
                                                                              </asp:RequiredFieldValidator>
                                                                             &nbsp;<label id="Label15" runat="server"><font color="red">*</font></label>
                                                                    </td>
                                                             </tr>
                                                       </table>
                                            </div>
                                            <div class="formList-detail">
                                                       <table>
                                                             <tr>
                                                                    <td width = "120px" valign="top">
                                                                         <asp:Label CssClass="font-label" runat = "server" ID= "lblRemark" Text = "เหตุผลในการขอเบิก          : " Font-Bold="true"/>
                                                                    </td>
                                                                    <td>
                                                                          <telerik:RadTextBox ID="txtRemark" runat="server" title="เหตุผลในการขอเบิก " Width="770" Height="30px" Enabled="false" TextMode="MultiLine"></telerik:RadTextBox>
                                                                    </td>
                                                             </tr>
                                                       </table>    
                                            </div>
                                            <asp:Panel ID="Panel2" runat="server" CssClass="contentPaneDiv" Height="40px" ScrollBars="Auto" align = "right" >
                                                                  <table>
                                                                         <tr>
                                                                               <td>
                                                                                     <asp:LinkButton ID="btnNext" runat="server" CausesValidation="false" OnClick="btnNext_OnClick"> 
                                                                                             <img alt="" src="../Image/Button/next_button.png" style="border:0px;vertical-align:middle;" /> 
                                                                                     </asp:LinkButton>
                                                                               </td>
                                                                         </tr>
                                                                  </table>
                                            </asp:Panel>
                                     </asp:Panel>
                                     
                                  </div>          
                            </div>   
                 </telerik:RadPageView>
                 <telerik:RadPageView ID="RadPageView2" runat="server">
                            <div class="moduleContent1000">
                                    <div class="moduleDivBottom1000">
                                          <asp:Panel ID="Panel5" runat="server" CssClass="contentPaneDiv" Height="30px" ScrollBars="Auto" >
                                              <table cellpadding="0" cellspacing="0">
                                                  <tr class="command-list">
                                                          <td>
                                                                <asp:LinkButton ID="btnInsert" runat="server" CausesValidation="false" CssClass="LinkButton" OnClick="btnInsert_Click">
                                                                <img alt="" src="../Image/Grid/AddRecord.gif" style="border:0px;vertical-align:middle;" />&#160;&#160;เพิ่มข้อมูลใหม่ 
                                                                </asp:LinkButton>
                                                           </td>
                                                           <td class="command-item" style="border: none">
                                                                <asp:LinkButton ID="btnSave" runat="server" CssClass="LinkButton"  onclick="btnSave_Click">
                                                                    <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/Cmd_Save.gif" />&nbsp;&nbsp;บันทึกข้อมูล
                                                                </asp:LinkButton>
                                                            </td>
                                                            <td class="command-item">
                                                                <asp:LinkButton ID="btnCancel" runat="server" CssClass="LinkButton"  onclick="btnCancel_Click" CausesValidation="false">
                                                                    <img style="border:0px;vertical-align:middle;" alt="" src="../Image/Grid/Cancel.gif" />&nbsp;&nbsp;ยกเลิก
                                                                </asp:LinkButton>
                                                            </td>
                                                   </tr>
                                              </table>
                                          </asp:Panel>
                                      </div>
                            </div>
                            <div class="moduleContent1000">
                                  <div class="moduleDivBottom1000">
                                     <asp:Panel ID="Panel3" runat="server" CssClass="contentPaneDiv" Height="390px" ScrollBars="Auto" align = "left" >    
                                              <table align="center">
                                                          <tr>
                                                                 <td>
                                                                         <div class="formList-detail">
                                                                                          <div class="header-grid" align="left">
                                                                                                   <asp:Label ID="lblHeaderList" runat="server" Text="รายละเอียดใบเบิกของ"></asp:Label>
                                                                                          </div>
                                                                                          <div class="formList-detail">
                                                                                                      <table>
                                                                                                              <tr>
                                                                                                                     <td width = "120px" valign="top">
                                                                                                                           <asp:Label CssClass="font-label" runat = "server" ID= "lblInventoryCode" Text = "เลือกพัสดุที่ต้องการเบิก " Font-Bold="true"/>
                                                                                                                     </td>
                                                                                                                     <td>
                                                                                                                           <telerik:RadComboBox ID="cmbChooseInventoryItem" runat="server" 
                                                                                                                                    AllowCustomText="true" EmptyMessage="< รายการวัสดุ >" 
                                                                                                                                    EnableLoadOnDemand="true" EnableVirtualScrolling="true" Height="230px" 
                                                                                                                                    HighlightTemplatedItems="true" MarkFirstMatch="false" 
                                                                                                                                    OnClientTextChange="onTextChangeGeneral" 
                                                                                                                                    OnItemsRequested="cmbChooseInventoryItem_ItemsRequested" 
                                                                                                                                    ShowDropDownOnTextboxClick="true" ShowMoreResultsBox="true" Width="500px">
                                                                                                                                    <HeaderTemplate>
                                                                                                                                        <table cellpadding="0" cellspacing="0" class="font-label">
                                                                                                                                            <tr>
                                                                                                                                                <td align="center" width="150px"><b>รหัสวัสดุ</b></td>
                                                                                                                                                <td align="center" width="200px"><b>ชื่อวัสดุ</b></td>
                                                                                                                                                <td align="center" width="200px"><b>รายละเอียดของวัสดุ</b></td>
                                                                                                                                            </tr>
                                                                                                                                        </table>
                                                                                                                                    </HeaderTemplate>
                                                                                                                                    <ItemTemplate>
                                                                                                                                        <asp:Table ID="tableInventoryItem" runat="server" CellPadding="0" 
                                                                                                                                            CellSpacing="0" CssClass="font-label">
                                                                                                                                        </asp:Table>
                                                                                                                                    </ItemTemplate>
                                                                                                                                </telerik:RadComboBox>
                                                                                                                                <%--<asp:RequiredFieldValidator runat="server" 
                                                                                                                                        ID="rfvChooseInventoryItem" 
                                                                                                                                        ControlToValidate="cmbChooseInventoryItem"
                                                                                                                                        ErrorMessage="*" >
                                                                                                                                </asp:RequiredFieldValidator>--%>
                                                                                                                                &nbsp;<label id="Label26" runat="server"><font color="red">*</font></label>
                                                                                                                        </td>
                                                                                                              </tr>
                                                                                                     </table>    
                                                                                                  </div>        
                                                                                                  <%--<div class="formList-detail">
                                                                                                     <table>
                                                                                                              <tr>
                                                                                                                     <td width = "120px" valign="top">
                                                                                                                                    <asp:Label CssClass="font-label" ID ="lblQuantityRemain" runat ="server"  Text="จำนวนที่เหลือในคลัง" Font-Bold="true" />
                                                                                                                     </td>
                                                                                                                     <td>
                                                                                                                                    <telerik:RadTextBox ID="txtQuantityRemain" runat="server" title="จำนวนที่เหลือในคลัง " Width="111" Enabled="false"></telerik:RadTextBox>
                                                                                                                                    <asp:Label CssClass="font-label" ID ="lblUnitRemainName" runat ="server"  Text="หน่วย" Font-Bold="true" />
                                                                                                                     </td>
                                                                                                              </tr>
                                                                                                     </table>
                                                                                                  </div>     --%>       
                                                                                                  <div class="formList-detail">
                                                                                                     <table>
                                                                                                              <tr >
                                                                                                                     <td width = "120px" valign="top">
                                                                                                                                    <asp:Label CssClass="font-label" ID ="lblQuantity" runat ="server"  Text="จำนวนที่เบิก" Font-Bold="true" />
                                                                                                                     </td>
                                                                                                                     <td>
                                                                                                                                    <telerik:RadTextBox ID="txtQuantity" runat="server" title="จำนวนที่เบิก " Width="111" Enabled="false"></telerik:RadTextBox>
                                                                                                                                    <asp:Label CssClass="font-label" ID ="pUnitName" runat ="server"  Text="หน่วย" Font-Bold="true" />
                                                                                                                                    &nbsp;<label id="Label1" runat="server"><font color="red">*</font></label>
                                                                                                                     </td>
                                                                                                              </tr>
                                                                                                    </table>
                                                                                                  </div>  
                                                                          </div> 
                                                                 </td>
                                                          </tr>
                                                          <tr>
                                                                 <td>
                                                                         <telerik:RadGrid ID="grdRequisition" runat="server" AutoGenerateColumns="false"
                                                                                    AllowMultiRowEdit="false" AllowMultiRowSelection="true" ShowStatusBar="true"
                                                                                    Width="922px" Height="199px" AllowPaging="true" AllowFilteringByColumn="true"
                                                                                    GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                                                                    GroupingSettings-GroupContinuedFormatString=""
                                                                                    GroupingSettings-GroupContinuesFormatString=""
                                                                                    GroupingSettings-GroupSplitFormat=""
                                                                                    OnNeedDataSource="grdRequisition_NeedDataSource"
                                                                                    OnItemCommand="grdRequisition_ItemCommand" align ="left">
                                                                                    <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                                                                        DataKeyNames="requisition_code" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                                                                        <RowIndicatorColumn>
                                                                                            <HeaderStyle Width="20px" />
                                                                                        </RowIndicatorColumn>
                                                                                        <ExpandCollapseColumn>
                                                                                            <HeaderStyle Width="20px" />
                                                                                        </ExpandCollapseColumn>
                                                                                        <Columns>   
                                                                                            <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Edit" HeaderText="แก้ไข" HeaderStyle-Width="40px" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"> 
                                                                                                <FilterTemplate></FilterTemplate>
                                                                                                <ItemTemplate>
                                                                                                    &nbsp;&nbsp;&nbsp;
                                                                                                        <asp:ImageButton ID="cmdEdit" runat="server" CommandName="DataEdit"
                                                                                                            ImageUrl="~/App_UI/Images/Buttons/Edit.gif" 
                                                                                                            ToolTip="แก้ไขรายการ" width="17" />    
                                                                                                </ItemTemplate>
                                                                                            </telerik:GridTemplateColumn>
                                                                                            <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Delete" HeaderText="ลบ" HeaderStyle-Width="40px" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center"> 
                                                                                                <FilterTemplate></FilterTemplate>
                                                                                                <ItemTemplate>
                                                                                                    &nbsp;&nbsp;&nbsp;
                                                                                                         <asp:ImageButton ID="cmdDelete" runat="server" CommandName="DataDelete"
                                                                                                            ImageUrl="~/App_UI/Image/Grid/Delete.gif" OnClientClick="javascript:return confirm('ยืนยันการลบข้อมูลที่เลือก')"
                                                                                                            ToolTip="ลบรายการ" width="17" /> 
                                                                                                </ItemTemplate>
                                                                                            </telerik:GridTemplateColumn>
                                                                                            <telerik:GridBoundColumn DataField="requisition_code" 
                                                                                                UniqueName="requisition_code"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="requisiton_des_item" 
                                                                                                UniqueName="requisiton_des_item"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="requisition_item" 
                                                                                                UniqueName="requisition_item"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="icm_res_item_seq" 
                                                                                                UniqueName="icm_res_item_seq"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" >
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="icm_res_item_name" 
                                                                                                HeaderText="รายการวัสดุที่เบิกของออก" UniqueName="icm_res_item_name" 
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                            </telerik:GridBoundColumn>
                                                                                            <telerik:GridBoundColumn DataField="quantity" 
                                                                                                HeaderText="จำนวน (หน่วย)" UniqueName="quantity" HeaderStyle-Width="140px"
                                                                                                FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                                                CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                                                HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                                            </telerik:GridBoundColumn>
                                                                                        </Columns>
                                                                                        <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                                                                            FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                                                                            NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                                                            PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                                                                        </MasterTableView>
                                                                            <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                                                GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                                                GroupSplitFormat="" />
                                                                            <ClientSettings EnableRowHoverStyle="True">
                                                                                <Selecting AllowRowSelect="true" />
                                                                                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                                            </ClientSettings>
                                                                        </telerik:RadGrid> 
                                                                 </td>
                                                          </tr>
                                              </table>                             
                                     </asp:Panel>
                                     
                                </div>
                          </div>        
                 </telerik:RadPageView>
             </telerik:RadMultiPage>   
    </form>                
</body>
